package com.zxq.web.iot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zxq.web.iot.mapper.IotPacketMapper;
import com.zxq.web.iot.domain.IotPacket;
import com.zxq.web.iot.service.IIotPacketService;

/**
 * 数据包Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-06
 */
@Service
public class IotPacketServiceImpl implements IIotPacketService 
{
    @Autowired
    private IotPacketMapper iotPacketMapper;

    /**
     * 查询数据包
     * 
     * @param id 数据包主键
     * @return 数据包
     */
    @Override
    public IotPacket selectIotPacketById(Long id)
    {
        return iotPacketMapper.selectIotPacketById(id);
    }

    /**
     * 查询数据包列表
     * 
     * @param iotPacket 数据包
     * @return 数据包
     */
    @Override
    public List<IotPacket> selectIotPacketList(IotPacket iotPacket)
    {
        return iotPacketMapper.selectIotPacketList(iotPacket);
    }

    /**
     * 新增数据包
     * 
     * @param iotPacket 数据包
     * @return 结果
     */
    @Override
    public int insertIotPacket(IotPacket iotPacket)
    {
        return iotPacketMapper.insertIotPacket(iotPacket);
    }

    /**
     * 修改数据包
     * 
     * @param iotPacket 数据包
     * @return 结果
     */
    @Override
    public int updateIotPacket(IotPacket iotPacket)
    {
        return iotPacketMapper.updateIotPacket(iotPacket);
    }

    /**
     * 批量删除数据包
     * 
     * @param ids 需要删除的数据包主键
     * @return 结果
     */
    @Override
    public int deleteIotPacketByIds(Long[] ids)
    {
        return iotPacketMapper.deleteIotPacketByIds(ids);
    }

    /**
     * 删除数据包信息
     * 
     * @param id 数据包主键
     * @return 结果
     */
    @Override
    public int deleteIotPacketById(Long id)
    {
        return iotPacketMapper.deleteIotPacketById(id);
    }
}
